﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HDLogCenter.Infrastructure.Models
{
    public class AppLogModel
    {
        public long Id { get; set; }

        /// <summary>
        /// 服务编码（应用代码）
        /// </summary>
        public string ServerCode { get; set; }

        /// <summary>
        /// 日志唯一标识
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 服务器 IP
        /// </summary>
        public string ServerIp { get; set; }

        /// <summary>
        /// 日志级别（如 1=Info，2=Warn，3=Error）
        /// </summary>
        public int Level { get; set; }

        /// <summary>
        /// 日志消息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 异常堆栈
        /// </summary>
        public string ErrorStack { get; set; }

        /// <summary>
        /// 是否超时
        /// </summary>
        public bool IsTimeout { get; set; }

        /// <summary>
        /// 耗时（毫秒）
        /// </summary>
        public int Millisecond { get; set; }

        /// <summary>
        /// HTTP 方法
        /// </summary>
        public string HttpMethod { get; set; }

        /// <summary>
        /// 请求地址
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }
}
